package com.android.settings.audio.peq.skin;

import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Color;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;

import com.android.settings.audio.peq.util.SmartPlayerApplication;

/**
 * Created by We ( welee_911@163.com ) on 2023/12/5
 */
public class SkinManager {
    private SkinManager() {

    }

    public void setCheckBoxLeftDrawable(CheckBox checkboxSave, int skinSelectorCheckboxCircle3) {
    }

    public int getIconColorSupportCustom() {
        return 0;
    }

    public static final class InstanceHolder {
        private static final SkinManager instance = new SkinManager();
    }

    public static SkinManager get() {
        return InstanceHolder.instance;
    }

    public void setSwitchDrawable(View v, int resId) {

    }

    public void changeCustomView(View v, boolean b) {

    }

    public void setTextViewColor(View v, int resId) {
    }

    public void setCheckBoxButton(View v, int resId) {

    }

    public int getThemeMode() {
        return (SmartPlayerApplication.getInstance().getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES ? BLACK_MODE : CUSTOM_MODE;
    }

    public static String getTheme(Context context) {
        return "";
    }

    public int getCustomColor() {
        return 0;
    }

    public void setImageDrawable(ImageView iv, int resid) {
        if (iv == null) return;
        if (getThemeMode() == BLACK_MODE) {
            iv.setColorFilter(Color.WHITE);
        } else {
            iv.setColorFilter(Color.BLACK);
        }
        iv.setImageResource(resid);
    }

    public static final int BLACK_MODE = 0;
    public static final int GREEN_MODE = 1;
    public static final int CUSTOM_MODE = 2;
}
